package com.android.canvasproject.view.activities;

import java.util.Timer;
import java.util.TimerTask;

import com.android.canvasproject.MainActivity;
import com.android.canvasproject.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.WindowManager;

public class SplashScreenActivity extends Activity {

	private static final Integer SPLASH_TIME_OUT = Integer.valueOf(1000);

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
		setContentView(R.layout.activity_splash_screen);

		new Timer().schedule(new TimerTask() {

			@Override
			public void run() {
				Intent intent = new Intent(SplashScreenActivity.this, MainActivity.class);
				startActivity(intent);
				finish();
			}
		}, SPLASH_TIME_OUT);
	}
}